import 'package:favor_cate/core/model/meal_model.dart';
import 'package:flutter/cupertino.dart';

class FavorMealViewModel extends ChangeNotifier {
  List<MealModel> _favorMeals = [];

  void addFavor(MealModel mealModel) {
    _favorMeals.add(mealModel);
    notifyListeners();

}

  void removeFavor(MealModel mealModel) {
    _favorMeals.remove(mealModel);
    notifyListeners();

  }

  bool isFavor(MealModel mealModel) {
    return _favorMeals.contains(mealModel);
  }

  List<MealModel> get favorMeal => _favorMeals;
}